/*
 * Copyright 2023 devaper
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.github.devaper.pigeon

import java.lang.reflect.*

/**
 * Client每个方法都会有这么一个上下文, 保存着从方法以及它自身的相关信息
 *
 * 如果希望使用Client接口, 那么调用 [Method.getDeclaringClass] 即可
 *
 * @param method 方法本身
 * @param actualType 真实的结果类型, 去包装的结果, Deferred<ActualType>
 * @param parameters 方法内的参数列表
 */
data class MethodContext(
    val method: Method,
    val actualType: Type,
    val parameters: List<Parameter>
)